libcerebra.so:  libdemo.so
		$(CC)    -o "build/libcerebra.so" -Wl,-h -Wl,build/libcerebra.so -shared -Wl,--start-group "build/cerebra.o" "build/libdemo.so"  -m$(BITS) -Wl,-Bstatic  -Wl,-Bdynamic  -Wl,--end-group -g -march=$(ARCH) -L$(LD_LIBRARY_PATH) -L build -lcudart -lcufft -lboost_python-mt -ldemo
demo.cpp:	demo.cu host.cu node.cu node.h
		nvcc --cuda  -I$(INCLUDE)/python2.6 -I$(PYTHON_LIBDIR)site-packages/numpy/core/include/numpy --compiler-bindir=$(CC) demo.cu -m$(BITS)
		mv demo.cu.cpp demo.cpp

demo.o:		demo.cpp
	    	$(CC)  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC    -I$(INCLUDE) -c -o "build/demo.o" "demo.cpp" -I$(INCLUDE)/$(PYTHON) -I$(CUDA)/include -m$(BITS) -march=$(ARCH) 


cerebra.o:	demo.o
		$(CC)  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC    -I$(INCLUDE) -c -o "build/cerebra.o" "cerebra.cpp" -I$(INCLUDE)/$(PYTHON) -I$(CUDA)/include -m$(BITS) -march=$(ARCH)

libdemo.so:	cerebra.o
		$(CC)  -shared  -o "build/libdemo.so" "build/demo.o"  -g -m$(BITS) -march=$(ARCH) -L$(LD_LIBRARY_PATH) -lcudart -lcufft -lboost_python

clean:          
		rm -rf demo.cpp build    
